home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / CD32 / CD32_Support / s / isomount < prev   
Encoding:
AmigaDOS Script File  |  1993-10-18  |  2.5 KB  |  71 lines

  1. .key isofilename/a,unitnum/k
  2. .def unitnum "2"
  3. .bra {
  4. .ket }
  5.  
  6. ; Mounts an ISO image file using modified Dillon's fmsdisk.device
  7. ; and the Amiga L:cdfilesystem (V40)
  8. ; Usage: isomount isofilename  (unitnum is optional)
  9. ; Default unit 2, device name ISO2:
  10. ; Will use next higher unit numbers/names if a unit is already mounted.
  11. ;
  12. ; Warning - I would not suggest mounting an ISO image with exact
  13. ; match CD in a CD-ROM drive attached to same system.  Might be
  14. ; identical enough to confuse/hand Workbench.
  15. ; Technical details taken care of by this script, FYI....
  16. ; Modified fmsdisk.device 1.1 (CAS 7/93) will look for
  17. ; ENV:FMSUnit<n> where n is digit of the unit and will read the
  18. ; ENV variable for the full path to the disk image file.
  19. ; If ENV variable is not found, falls back to old method:
  20. ; ISO image must be named Unitn where n is digit of the Unit below
  21. ; (for example Unit2) and the ISO image file must reside at FMS:
  22. ; (an asignment)
  23. ;
  24.  
  25. if not exists {isofilename}
  26.    echo "isomount: File *"{isofilename}*" not found... Aborting"
  27.    quit
  28. endif
  29.  
  30. setenv tmpu{$$} {unitnum}
  31.  
  32. lab loop
  33. assign >NIL: ISO$tmpu{$$}: exists
  34. if warn ; this unitnum is available
  35.    skip postloop
  36. else ; try next unitnum
  37.    setenv tmpu{$$} `eval $tmpu{$$} + 1`
  38.    skip loop back
  39. endif
  40. lab postloop
  41.  
  42. echo  >t:isomountlist$tmpu{$$} "ISO$tmpu{$$}:"
  43. echo >>t:isomountlist$tmpu{$$} "FileSystem    = L:CDFileSystem"
  44. echo >>t:isomountlist$tmpu{$$} "Device        = fmsdisk.device"
  45. echo >>t:isomountlist$tmpu{$$} "Unit        = $tmpu{$$}"
  46. echo >>t:isomountlist$tmpu{$$} "Flags        = 0"
  47. echo >>t:isomountlist$tmpu{$$} "Surfaces    = 1"
  48. echo >>t:isomountlist$tmpu{$$} "SectorsPerTrack    = 1"
  49. echo >>t:isomountlist$tmpu{$$} "SectorSize    = 2048"
  50. echo >>t:isomountlist$tmpu{$$} "Mask        = 0x7ffffffe"
  51. echo >>t:isomountlist$tmpu{$$} "MaxTransfer    = 0x100000"
  52. echo >>t:isomountlist$tmpu{$$} "Reserved    = 0"
  53. echo >>t:isomountlist$tmpu{$$} "Interleave    = 0"
  54. echo >>t:isomountlist$tmpu{$$} "LowCyl        = 0"
  55. echo >>t:isomountlist$tmpu{$$} "HighCyl        = 0"
  56. echo >>t:isomountlist$tmpu{$$} "Buffers        = 5"
  57. echo >>t:isomountlist$tmpu{$$} "BufMemType    = 0"
  58. echo >>t:isomountlist$tmpu{$$} "StackSize    = 1000"
  59. echo >>t:isomountlist$tmpu{$$} "Priority    = 10"
  60. echo >>t:isomountlist$tmpu{$$} "GlobVec        = -1"
  61. echo >>t:isomountlist$tmpu{$$} "DosType        = 0x43443031"
  62. echo >>t:isomountlist$tmpu{$$} "Mount        = 1"
  63. echo >>t:isomountlist$tmpu{$$} "#"
  64.  
  65. setenv FMSUnit$tmpu{$$} "`which {isofilename} NORES`"
  66. echo "Mounting `getenv FMSUnit$tmpu{$$}` as ISO$tmpu{$$}:"
  67. mount ISO$tmpu{$$}: from t:isomountlist$tmpu{$$}
  68.